/*
 * Copyright (C) <2009>  <Matthew Dickinson>
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package com.pulsarwebdevelopment.concordance.plugins;

import com.pulsarwebdevelopment.concordance.*;
import java.io.FileFilter;

import java.io.File;

/**
 * Creates a file name box and a browse button.
 * This allows a user to either browse to a file or enter the file name (or a combination). 
 * @author Matthew Dickinson
 * Last updated: 8/12/2009
 */
public abstract class FileBrowser {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public static enum FileType{
		TEXT(new TextFileFilter()),
		HTML(new HtmlFileFilter());
		
		FileFilter filter;
		
		FileType(FileFilter filter){
			this.filter = filter;
		}
		
		public FileFilter getFilter(){
			return filter;
		}
	}
	//public static final int TEXT = 1;
	//public static final int HTML = 2;

	
	public FileBrowser(FileType type) {

	}

//	public boolean hasFile(){
//		selectedFile = new File(fileField.getText());
//		return selectedFile.isFile();
//	}
	
	public abstract File getFile();

}
